<template>
  <div class="app-container">
    <el-card shadow="never" class="mb-3">
      <el-form ref="searchFormRef" :inline="true" class="mt-2.5" label-width="auto">
        <el-form-item prop="username" v-for="(item, index) in s1" :key="index" :label="item">
          <el-input placeholder="请选择" />
        </el-form-item>
        <el-form-item>
          <el-button type="primary">查询</el-button>
          <el-button>重置</el-button>
        </el-form-item>
      </el-form>
    </el-card>
    <el-card shadow="never" class="">
      <div class="toolbar-wrapper mb-3">
        <el-button type="primary">新建产品工号</el-button>
      </div>
      <el-table :data="tableData">
        <el-table-column type="selection" width="50" align="center" />
        <el-table-column type="index" label="序" width="50" />
        <el-table-column v-for="(item, index) in s1" :key="index" :label="item" :prop="'name' + index" />

        <el-table-column fixed="right" label="操作" align="center">
          <el-button type="danger" text bg size="small">删除</el-button>
        </el-table-column>
      </el-table>
    </el-card>
    <el-dialog v-model="dialogVisible" title="选择入库" width="30%">
      <el-form ref="formRef" :rules="formRules" label-width="auto">
        <el-form-item prop="username" label="仓库">
          <el-input placeholder="请选择" />
        </el-form-item>
      </el-form>
      <template #footer>
        <el-button @click="dialogVisible = false">取消</el-button>
        <el-button type="primary">确认</el-button>
      </template>
    </el-dialog>
  </div>
</template>
<script setup>
import { ref } from "vue"

const s1 = [
'产品名称',
'产品工号',
'机号',
'创建时间',
'备注',
]
const s2 = [
'物资名称',
'标准/型号',
'规格',
'材质',
'单位',
]
const num = 5
const s3 = [
'采购说明',
'产品工号',
'清单编号',
'申购人',
'申购部门',
'类别号',
'ABC分类',
'检验状态',
'物资编码',
'寄售',
'备注',
]
const formRules = {
  username: [{ required: true, trigger: "blur", message: "请输入" }]
}
const dialogVisible = ref(false)
const tableData = [ ]
for (let index = 0; index < 10; index++) {
  tableData.push({
    name0: "印度",
    name1: "3278498",
    name2: "1-6#",
    name3: "2024-05-28 16:29:28",
    name4: "",
    // name4: "PC",
    // name5: "5",
    // name6: "2",
    // name7: "室外维修架",
    // name8: "13794833",
    // name9: "",
    // name10: "张三",
    // name11: "",
    // name12: "234324",
    // name13: "",
    // name14: "",
    // name15: "2345",
    // name16: "",
    // name17: "",
})
}
</script>
<style lang="scss" scoped></style>
